/* 基础布局 */
.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.routerBar {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.content {
  flex: 1;
  display: flex;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  gap: 1px;
  overflow: hidden;
}

/* 侧边栏 */
.sidebar {
  width: 400px;
  min-width: 320px;
  max-width: 500px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.treeHeader {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #dfe3e8;
  background: linear-gradient(135deg, #f0f3f7 0%, #e3e8ef 100%);
}

.treeTitle {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: #262626;
  margin: 0;
}

.treeTitle::before {
  content: '';
  width: 3px;
  height: 16px;
  background: #1890ff;
  border-radius: 2px;
  margin-right: 10px;
}

.searchInput {
  width: 100%;
  border-radius: 6px;
}

/* 组织树 */
.orgTree {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
}

/* 自定义滚动条 */
.orgTree::-webkit-scrollbar {
  width: 6px;
}

.orgTree::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.orgTree::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  border-radius: 3px;
}

.orgTree::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
}

/* 树节点样式 */
.orgTree .ant-tree-node-content-wrapper {
  border-radius: 6px;
  transition: all 0.2s ease;
  padding: 4px 8px;
}

.orgTree .custom-tree-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 24px;
}

.orgTree .add-icon {
  opacity: 0;
  transition: all 0.2s ease;
  margin-left: 8px;
  color: #8c8c8c;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
}

.orgTree .custom-tree-node:hover .add-icon {
  opacity: 1;
  color: #1890ff;
}

.orgTree .add-icon:hover {
  background-color: #e6f7ff;
  transform: scale(1.1);
}

/* 树节点状态 */
.orgTree .ant-tree-node-content-wrapper:hover {
  background-color: #e6f7ff;
}

.orgTree .ant-tree-node-content-wrapper.ant-tree-node-selected {
  background-color: #1890ff;
  color: #fff;
}

.orgTree .ant-tree-node-selected .custom-tree-node {
  color: #fff;
}

.orgTree .ant-tree-node-selected .add-icon {
  color: rgba(255, 255, 255, 0.85);
}

.orgTree .ant-tree-node-selected .add-icon:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.2);
}

/* 详情区域 */
.orgDetailContainer {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
}

.orgDetailTitle {
  padding: 20px 24px;
  border-bottom: 1px solid #dfe3e8;
  background: linear-gradient(135deg, #f0f3f7 0%, #e3e8ef 100%);
  font-size: 16px;
  font-weight: 600;
}

.detail {
  height: 100%;
  overflow: hidden;
}

/* 组织详情表单 */
.orgDetailWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 32px);
  padding: 20px;
  margin: 16px;
}

.orgDetailContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.orgDetailField {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
}

.orgDetailLabel {
  min-width: 80px;
  font-weight: 500;
  flex-shrink: 0;
}

.orgDetailValue {
  flex: 1;
  max-width: 300px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  min-height: 32px;
  line-height: 24px;
  box-sizing: border-box;
}

.orgDetailInput,
.orgDetailSelect {
  flex: 1;
  max-width: 300px;
}

.orgDetailActions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.orgDetailActionBtn {
  min-width: 100px;
}
